package com.atguigu.springcloud;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author XiongJianLin
 * @date Created in 2024/2/29 20:55
 */
@SpringBootApplication
@MapperScan("com.atguigu.springcloud.mapper")
public class Main8001 {

    @Resource
    private ThreadPoolTaskExecutor threadPool;

    @PostConstruct
    public void getThreadPool(){
        System.out.println("=== 获取到的corePoolSize: "+threadPool.getCorePoolSize());
        System.out.println("=== 获取到的maxPoolSize: "+threadPool.getMaxPoolSize());
        System.out.println("=== 获取到的queueCapacity: "+threadPool.getQueueCapacity());
        System.out.println("=== 获取到的keepAliveSeconds: "+threadPool.getKeepAliveSeconds());
    }


    public static void main(String[] args) {
        SpringApplication.run(Main8001.class, args);
    }
}